package icu.groot.alan.hotel.entity.req;

import icu.groot.alan.hotel.util.BizException;
import icu.groot.alan.hotel.util.ResultCodeEnum;
import lombok.Data;

@Data
public class AdminLoginRo {

    /**
     * 用户名，用户账号
     */
    private Integer adminCode;

    /**
     * 密码
     */
    private String adminPassword;

    public Integer getAdminCode() {
        return adminCode;
    }

    public void setAdminCode(Integer adminCode) {
        if (adminCode == null){
            throw new BizException(ResultCodeEnum.FAILED.setMessage("账号不能为空"));
        }
        this.adminCode = adminCode;
    }

    public String getAdminPassword() {
        return adminPassword;
    }

    public void setAdminPassword(String adminPassword) {
        if (adminPassword == null || adminPassword.equals("")){
            throw new BizException(ResultCodeEnum.FAILED.setMessage("密码不能为空"));
        }
        this.adminPassword = adminPassword;
    }
}
